from selenium.webdriver.common.by import By
from WebTest.WebAutomationEncapsulation import test

test.ce()
class UserLoginPage:

    def __init__(self, driver):
        self.driver = driver

    def login_page(self, username, password):
        self.driver.find_element(By.ID, "username").send_keys(username)
        self.driver.find_element(By.NAME, "password").send_keys(password)
        self.driver.find_element(By.TAG_NAME, "button").click()
# def login(username,password):
#     test.ce()
#     driver.find_element(By.ID, "username").send_keys(username)
#     driver.find_element(By.NAME, "password").send_keys(password)
#     driver.find_element(By.TAG_NAME, "button").click()
